FILE(GLOB SRC *.cpp *.h)
FILE(GLOB HEADERS ../../../include/nel/sound/driver/*.h)

NL_TARGET_LIB(nelsnd_lowlevel ${HEADERS} ${SRC})

TARGET_LINK_LIBRARIES(nelsnd_lowlevel nelmisc)
NL_DEFAULT_PROPS(nelsnd_lowlevel "NeL, Library: Sound Lowlevel")
NL_ADD_RUNTIME_FLAGS(nelsnd_lowlevel)
NL_ADD_STATIC_SND_DRIVERS(nelsnd_lowlevel)

NL_ADD_LIB_SUFFIX(nelsnd_lowlevel)

IF(WITH_PCH)
  ADD_NATIVE_PRECOMPILED_HEADER(nelsnd_lowlevel ${CMAKE_CURRENT_SOURCE_DIR}/stdsound_lowlevel.h ${CMAKE_CURRENT_SOURCE_DIR}/stdsound_lowlevel.cpp)
ENDIF()

IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC)
  INSTALL(TARGETS nelsnd_lowlevel LIBRARY DESTINATION ${NL_LIB_PREFIX} ARCHIVE DESTINATION ${NL_LIB_PREFIX} COMPONENT libraries)
ENDIF()

IF(WITH_DRIVER_OPENAL)
  ADD_SUBDIRECTORY(openal)
ENDIF()

IF(WITH_DRIVER_FMOD)
  ADD_SUBDIRECTORY(fmod)
ENDIF()

IF(WITH_DRIVER_DSOUND)
  ADD_SUBDIRECTORY(dsound)
ENDIF()

IF(WITH_DRIVER_XAUDIO2)
  ADD_SUBDIRECTORY(xaudio2)
ENDIF()
